

测试部 = ['小明','小张','小黄','小杨']
研发部 = ['小黄','小李','小王','小杨','小周']
市场部 = ['小杨','小张','小吴','小冯','小周']


def main():
	person_count()
	find_only()
	find_3()

def person_count():
	print(f"共有{len(测试部)+len(研发部)+len(市场部)}人")

def find_only():
	only_count = 0
	only_list = []

	for person in 测试部:
		if person not in 研发部 and person not in 市场部:
			only_count += 1
			only_list.append(person)
	for person in 研发部:
		if person not in 测试部 and person not in 市场部:
			only_count += 1
			only_list.append(person)
	for person in 市场部:
		if person not in 测试部 and person not in 研发部:
			only_count += 1
			only_list.append(person)
	print(f"共有{only_count}人")
	print("分别是：", end="")
	for person in only_list:
		print(person, end=" ")
	print()

def find_3():
	count_3 = 0
	list_3 = []
	
	merged_list = 测试部 + 研发部 + 市场部

	unique_list = list(set(merged_list))
	for person in unique_list:
		if person in 测试部 and person in 研发部 and person in 市场部:
			count_3 += 1
			list_3.append(person)

	print(f"共有{count_3}人")
	print("分别是：", end="")
	for person in list_3:
		print(person, end=" ")
	print()

main()